/*
 * CompressorMock.h
 *
 *  Created on: Nov 30, 2012
 *      Author: m
 */

#ifndef COMPRESSORMOCK_H_
#define COMPRESSORMOCK_H_

#include <cstring>
#include "Compressor.h"

namespace physical
{

/**
 * Mock de Compressor
 *
 * Siempre se devuelven los mismos datos de entrada!
 */
class CompressorMock: public physical::Compressor
{
public:

    CompressorMock()
    {
    }

    virtual ~CompressorMock()
    {
    }

    /**
     * Simula que comprime
     */
    size_t compress( const byte* data, byte* compressedData,
            size_t dataSize )
    {
        memcpy( compressedData, data, dataSize );
        return dataSize;
    }

    /**
     * Simula que des-comprime
     */
    size_t uncompress( const byte* compressedData, byte* data,
            size_t compressedDataSize )
    {
        memcpy( data, compressedData, compressedDataSize );
        return compressedDataSize;
    }
};

} /* namespace physical */
#endif /* COMPRESSORMOCK_H_ */
